package com.portal4kids.view;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.portal4kids.controller.ServicesManager;
import com.portal4kids.model.ServicesAdditional;
import com.portal4kids.model.ServicesArt;
import com.portal4kids.model.ServicesLanguage;
import com.portal4kids.model.ServicesMusic;
import com.portal4kids.model.ServicesSport;
import com.portal4kids.model.ServicesTheaterScout;

public class ServicesAction extends ActionSupport{
	private ServicesSport sports;
	private ServicesManager serviceController;
	private List<ServicesSport> sportList;
	private ServicesArt art;
	private List<ServicesArt> artList;
	private ServicesLanguage language;
	private List<ServicesLanguage> languageList;
	private ServicesMusic music;
	private List<ServicesMusic> musicList;
	private ServicesTheaterScout t_s;
	private List<ServicesTheaterScout> t_sList;
	private ServicesAdditional additional;
	private List<ServicesAdditional> additonalList;
	
	public ServicesAction(){
		serviceController = new ServicesManager();
	}
	public String execute(){
		return SUCCESS;		
	}
	
	public String saveSport(){
		sports = serviceController.saveSport(getSports());
		return SUCCESS;		
	}
	
	public String saveArt(){
		art = serviceController.saveArt(getArt());
		return SUCCESS;		
	}
	
	public String saveLanguage(){
		language = serviceController.saveLanguage(getLanguage());
		return SUCCESS;		
	}
	
	public String saveMusic(){
		music = serviceController.saveMusic(getMusic());
		return SUCCESS;		
	}
	
	public String saveT_S(){
		t_s = serviceController.saveT_S(getT_s());
		return SUCCESS;		
	}
	
	public String saveAdditionalServices(){
		additional = serviceController.saveAdditionalService(getAdditional());
		return SUCCESS;		
	}
	
	public String searchSport(){
		sportList = serviceController.getSportFromDB(getSports());
		return SUCCESS;		
	}
	
	public String searchLanguage(){
		languageList = serviceController.getLanguageFromDB(getLanguage());
		return SUCCESS;		
	}
	
	public String searchArt(){
		artList = serviceController.getArtFromDB(getArt());
		return SUCCESS;		
	}
	
	public String searchMusic(){
		musicList = serviceController.getMusicFromDB(getMusic());
		return SUCCESS;		
	}
	
	public String searchT_S(){
		t_sList = serviceController.getT_SFromDB(getT_s());
		return SUCCESS;		
	}
	
	public String searchAdditionalServices(){
		additonalList = serviceController.getAdditionalFromDB(getAdditional());
		return SUCCESS;		
	}
	
//--------------------------------------------------------------------------------------------------------------------------------------//
	
	public ServicesSport getSports() {
		return sports;
	}
	public void setSports(ServicesSport sports) {
		this.sports = sports;
	}
	public List<ServicesSport> getSportList() {
		return sportList;
	}
	public void setSportList(List<ServicesSport> sportList) {
		this.sportList = sportList;
	}
	public ServicesArt getArt() {
		return art;
	}
	public void setArt(ServicesArt art) {
		this.art = art;
	}
	public ServicesLanguage getLanguage() {
		return language;
	}
	public void setLanguage(ServicesLanguage language) {
		this.language = language;
	}
	public ServicesMusic getMusic() {
		return music;
	}
	public void setMusic(ServicesMusic music) {
		this.music = music;
	}
	public ServicesTheaterScout getT_s() {
		return t_s;
	}
	public void setT_s(ServicesTheaterScout t_s) {
		this.t_s = t_s;
	}
	public ServicesAdditional getAdditional() {
		return additional;
	}
	public void setAdditional(ServicesAdditional additional) {
		this.additional = additional;
	}
	public List<ServicesLanguage> getLanguageList() {
		return languageList;
	}
	public void setLanguageList(List<ServicesLanguage> languageList) {
		this.languageList = languageList;
	}
	public List<ServicesArt> getArtList() {
		return artList;
	}
	public void setArtList(List<ServicesArt> artList) {
		this.artList = artList;
	}
	public List<ServicesMusic> getMusicList() {
		return musicList;
	}
	public void setMusicList(List<ServicesMusic> musicList) {
		this.musicList = musicList;
	}
	public List<ServicesTheaterScout> getT_sList() {
		return t_sList;
	}
	public void setT_sList(List<ServicesTheaterScout> t_sList) {
		this.t_sList = t_sList;
	}
	public List<ServicesAdditional> getAdditonalList() {
		return additonalList;
	}
	public void setAdditonalList(List<ServicesAdditional> additonalList) {
		this.additonalList = additonalList;
	}
	
}
